async function getInfo() {
  const response = await fetch("https://api.example.com/data");
  const data = await response.json();
  return data;
}

getInfo().then((data) => console.log(data));
